<%@ page contentType="text/html; charset=UTF-8" %>

<!DOCTYPE html> 

<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<html lang="en">

<jsp:include page="fragments/headTag.jsp"/>

<body>
<div class="container">
    <jsp:include page="fragments/bodyHeader.jsp"/>
    <h2><fmt:message key="login"/></h2>
    
	<c:if test="${not empty error}">
		<div class="text-error">
		   <span class="text-error">${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message}</span>
		</div>
	</c:if>
	
    
        <form name="login-form" action="<c:url value='j_spring_security_check' />" method="post" class="form-horizontal" >
    	<div class="control-group">
    	  <label class="control-label">Username</label>
    	  <div class="controls">
    	    <input name="j_username" type="text" autofocus="true"/>
    	  </div>
    	</div>
    	
    	<div class="control-group">
    	  <label class="control-label">Password</label>
    	  <div class="controls">
    	    <input name="j_password" type="password" />
    	  </div>
    	</div>

        <div class="form-actions">
            <button type="submit"><fmt:message key="login"/></button>
        </div>
    </form:form>
    
    <jsp:include page="fragments/footer.jsp"/>

</div>
</body>

</html>
